package com.dsa.team5.kanban.service.impl;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dsa.team5.kanban.dao.KanbanDao;
import com.dsa.team5.kanban.model.Kanban;
import com.dsa.team5.kanban.service.KanbanService;

@Service
@Transactional
public class KanbanServiceImpl implements KanbanService {

	@Autowired
	SessionFactory sessionFactory;
	
	@Autowired
	KanbanDao kanbanDao;

	@Override
	public void save(Kanban kanban) {
		kanbanDao.save(kanban);
	}

	@Override
	public void update(Kanban kanban) {
		kanbanDao.update(kanban);
	}

	@Override
	public void delete(Kanban kanban) {
		kanbanDao.delete(kanban);
	}

	@Override
	public Kanban getKanbanByCode(String kanbanCode) {
		return kanbanDao.getKanbanByCode(kanbanCode);
	}
}
